package com.datarfid.schedule_android.model;


import java.io.Serializable;

public class Schedule implements Serializable {


    //时间块长度，半格长度为1
    private Integer scheduleLength;

    //事件名称
    private String scheduleName;


    public Schedule() {

    }

    /**
     *
     * @param scheduleLength
     * @param scheduleName
     * @param colorCode
     * @param row
     * @param column
     */
    public Schedule(Integer scheduleLength, String scheduleName,
                    String colorCode, Integer row, Integer column) {
        this.scheduleLength = scheduleLength;
        this.scheduleName = scheduleName;
        this.colorCode = colorCode;

        this.row = row *2;
        this.column = column;
        this.position = row*7+column;
    }


    //该单元格位置的背景颜色,填写颜色代码 例如 #FFFFFF
    private String colorCode;

    /**
     * 单元格位置Position、行Row、列Columm的关系
     * Position = Row * 7 + Column
     * Row = Position / 7
     * Column = Position % 7
     */

    //课程在单元格中所在的位置
    //顺序从上到下，从左到右，数值从0开始计算
    private Integer position;

    //单元格所在的行,从0开始计算
    //数值也代表课程的节数
    //第n节：n = row + 1
    //半格时间为1
    private Integer row;

    //单元格所在的列,从0开始计算
    //数值也代表星期几
    //星期几：n = colum + 1
    private Integer column;

    public Integer getPosition() {
        return position;
    }

    public void setPosition(Integer position) {
        this.position = position;
    }

    public Integer getScheduleLength() {
        return scheduleLength;
    }

    public void setScheduleLength(Integer scheduleLength) {
        this.scheduleLength = scheduleLength;
    }

    public String getScheduleName() {
        return scheduleName;
    }

    public void setScheduleName(String scheduleName) {
        this.scheduleName = scheduleName;
    }



    public String getColorCode() {
        return colorCode;
    }

    public void setColorCode(String colorCode) {
        this.colorCode = colorCode;
    }

    public Integer getRow() {
        return row;
    }

    public void setRow(Integer row) {
        this.row = row;
    }

    public Integer getColumn() {
        return column;
    }

    public void setColumn(Integer column) {
        this.column = column;
    }


}
